package com.flash.BusinessParameters.mapper;

import com.flash.BusinessParameters.entity.Broker;
import org.apache.ibatis.annotations.*;


import java.util.List;
import java.util.Map;

@Mapper
public interface BrokerMapper {
    @Select("select * from broker")
   List<Broker> selectBroker();

    @Insert("insert into broker values(#{brokerId},#{brokerName},#{brokerName})")
    int insertBroker(Broker broker);

    @Delete("delete from broker where brokerId=#{brokerId}")
    int deleteBroker(String brokerId);

    @Update("update broker set brokerName=#{brokerName},brokerRemark=#{brokerRemark} where brokerId=#{brokerId}")
    int updateBroker(Broker broker);

    @Select("select * from (select rownum rn,b.* from broker b) where 1=1 ${brokerName} and rn between #{page} and #{limit}")
    public List<Broker> selectBrokerMap(Map map);
    @Select("select count(*) from broker")
    public int selectCountBroker();
}
